{include file="public/header" /}

<style>
    body{
        background: #FFF;
    }

</style>
<form id="store_form" method="post" novalidate="novalidate">
<div class="page">
    <table class="ds-default-table order">
        <tr>
            <th>设备信息</th>
        </tr>
        <tr>
            <td colspan="2">
                <ul>
                    <li><strong>设备名称:</strong>{$detail.goods_name}</li>
                    <li><strong>设备品牌:</strong>{$detail.b_name}</li>
                    <li><strong>设备规格型号:</strong>{$detail.type_model}</li>
                    <li><strong>诊断原因:</strong>
                        <textarea style="width: 250px;height: 100px;" name="diagnostic_results" id ="diagnostic_results">{$detail.diagnostic_results}</textarea>
                    </li>
                    {notempty name="detail.science_pics"}
                    {foreach name="$detail.science_pics" item="pic" key="k"}
                    <li><strong>现场图{$k+1}:</strong><img src={$pic} alt="" width="200px" height="100px"></li>
                    {/foreach}
                     {/notempty}
                </ul>
            </td>
        </tr>

       {notempty name="doptions"}
        <tr>
            <th>部位信息</th>
        </tr>
        <tr>
            <td colspan="2">
                <ul>
                    {foreach name="$doptions" item="option"}
                    {if $option.selected == 1}
                    <li><strong>{$option.content}:</strong>{$select[$option.selected]}  需要时间:{$option.hours}小时</li>
                    {/if}
                    {/foreach}
                </ul>
            </td>
        </tr>
        {/notempty}
    </table>
    <table class="ds-default-table order">
        <tr>
            <th>服务单定价</th>
        </tr>
      
            <table class="ds-default-table">
                <input type="hidden" name="order_id" value={$detail.id} >

                <tr class="noborder" style="background: rgb(255, 255, 255);">
                    <td  style="width:20%">当前单预测耗时: </td>
                    <td class="vatop rowform"><input type="text" value='{$time}' name="need_hours" id="brand_sort1" class="txt"></td>
                    <td class="vatop tips">* 系统根据订单类型和选择部位计算大概耗时</td>
                </tr>

                <tr class="noborder" style="background: rgb(255, 255, 255);">
                    <td class="required">当前单维修部位: </td>
                    <td class="vatop tips">
                        {foreach name="$options" item="option"}
                            <span style="font-weight: bold;color: red;">{$option}</span>
                        {/foreach}
                    </td>
                </tr>
                <tr class="noborder" style="background: rgb(255, 255, 255);">
                    <td  style="width:20%">每工时收费用: </td>
                    <td class="vatop rowform"><input type="text" value={$detail.payper_hour} name="payper_hour" id="brand_sort" class="txt"></td>
                    <td class="vatop tips">* 请输入数字,系统根据当前地区建议单小时价格</td>
                </tr>
                <tr class="noborder" style="background: rgb(255, 255, 255);">
                    <td  style="width:20%">服务工时费: </td>
                    <td class="vatop rowform"><input type="text" value={$detail.fuwu_hour}  name="fuwu_hour" id="fuwu_hour"  class="txt"></td>
                </tr>
                <!-- <tr class="noborder">
                    <td class="w120">建议下次保养时间:</td>
                    <td class="vatop rowform">
                      <input style="width: 250px;" id="next_care_time" value="" name="next_care_time" type="text" class="text w130" readonly/>
                  </td>
                </tr> -->
               
                <tr class="tfoot">
                    <td colspan="15"><input style="line-height: 30px;" class="btn" type="submit" value="设置服务费"></td>
                </tr>
            </table>
        </form>
    </table>
</div>
<script type="text/javascript" src="{$Think.ADMIN_SITE_ROOT}/js/jquery.edit.js" charset="utf-8"></script>
<script type="text/javascript" src="{$Think.PLUGINS_SITE_ROOT}/jquery.mousewheel.js"></script>
<script type="text/javascript" src="{$Think.PLUGINS_SITE_ROOT}/mlselection.js" charset="utf-8"></script>
<script type="text/javascript" src="{$Think.PLUGINS_SITE_ROOT}/mlselection.js" charset="utf-8"></script>
<script type="text/javascript" src="{$Think.PLUGINS_SITE_ROOT}/jquery.mousewheel.js"></script>
<link rel="stylesheet" href="{$Think.PLUGINS_SITE_ROOT}/js/jquery.lightbox/css/lightbox.min.css">
<script src="{$Think.PLUGINS_SITE_ROOT}/js/jquery.lightbox/js/lightbox.min.js"></script>
<link rel="stylesheet" href="{$Think.PLUGINS_SITE_ROOT}/js/jquery-ui-timepicker/jquery-ui-timepicker-addon.min.css">
<script src="{$Think.PLUGINS_SITE_ROOT}/js/jquery-ui-timepicker/jquery-ui-timepicker-addon.min.js"></script>
<script src="{$Think.PLUGINS_SITE_ROOT}/js/jquery-ui-timepicker/i18n/jquery-ui-timepicker-zh-CN.js"></script>
<script>
        $(document).ready(function () {
        $("form").submit(function (e) {
            var brand_sort1 = $('#brand_sort1').val();
            var brand_sort = $('#brand_sort').val();
            var fuwu_hour = $('#fuwu_hour').val();
            // var next_care_time = $('#next_care_time').val();

            if (brand_sort1 == '') {
                layer.msg('工时数不能为空');
                return false;
            }
            if (brand_sort == 0) {
                layer.msg('每小时工时费不能为空');
                return false;
            }
            if (fuwu_hour == 0.00) {
                layer.msg('服务工时费不能为空');
                return false;
            }
            // if (next_care_time == '') {
            //     layer.msg('建议下次保养时间不能为空');
            //     return false;
            // }

        });
    });
    $(function(){
        $('#next_care_time').datetimepicker({dateFormat: 'yy-mm-dd'});
});
</script> 